#!/usr/bin/env ruby
require 'rubygems'
require 'sinatra'
require 'sinatra/reloader'

module Blather::DSL
	def epic
		@epic ||= Epic::Client.new client
	end
end

class EpicClient
	include Blather::DSL

	def initialize
		user = 'admin'
		setup "#{user}@#{Socket.gethostname}", user
		when_ready { puts "connected! send messages to #{jid}"   }
		disconnected { puts "disconnecting!" }
		@epic_status = Epic::Status.new(client)
	end

	def run
		client.run
	end
end


c = EpicClient.new
Thread.new { EM.run { c.run } }

get '/' do
end



